package com.example.netty.netty.dubboRPC.customer;

import com.example.netty.netty.dubboRPC.netty.NettyClient;
import com.example.netty.netty.dubboRPC.publicInterface.HelloService;

/**
 * @Author: 江涛
 * @CreateTime: 2022-09-22  22:05
 * @Description:
 */
public class ClientBootstrap {
    //协议头
    public static final String providerName = "HelloServer-hello#";

    public static void main(String[] args) {
        //创建客户端
        NettyClient nettyClient = new NettyClient();

        //创建代理对象
        HelloService proxy = (HelloService) nettyClient.getBean(HelloService.class, providerName);

        //调用代理对象（本来应该对外提供方法，让其他类来调用ClientBootstrap的）
        System.out.println(proxy.hello("hello"));
    }
}
